package io.gitee.zhangbinhub.acp.boot

import io.gitee.zhangbinhub.acp.boot.component.AcpJackson2ObjectMapperBuilderCustomizer
import org.springframework.boot.autoconfigure.AutoConfiguration
import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration
import org.springframework.boot.autoconfigure.jackson.JacksonProperties
import org.springframework.boot.context.properties.EnableConfigurationProperties
import org.springframework.context.annotation.Bean

/**
 * @author zhang by 30/07/2019
 * @since JDK 11
 */
@AutoConfiguration(before = [JacksonAutoConfiguration::class])
@EnableConfigurationProperties(JacksonProperties::class)
class AcpJacksonAutoConfiguration {
    @Bean
    fun acpJackson2ObjectMapperBuilderCustomizer(jacksonProperties: JacksonProperties) =
        AcpJackson2ObjectMapperBuilderCustomizer(jacksonProperties)
}